package com.yxdj.feedback.api.factory;

import com.yxdj.common.core.domain.R;
import com.yxdj.feedback.api.RemoteUserReviewService;
import com.yxdj.feedback.api.dto.UserReviewDto;
import com.yxdj.feedback.api.vo.UserReviewVo;
import org.springframework.cloud.openfeign.FallbackFactory;

/**
 * @author 韩总
 */
public class RemoteUserReviewFallbackFactory implements FallbackFactory<RemoteUserReviewService> {
    @Override
    public RemoteUserReviewService create(Throwable cause) {
       return new RemoteUserReviewService() {
           @Override
           public R<UserReviewVo> getUserReviewList(UserReviewDto userReviewDto, String source) {
               return R.fail("远程调用反馈微服务根据用户条件查询评价失败："+cause.getMessage());
           }
       };
    }
}
